import pdfplumber

def extract_text_from_pdf(pdf_path):
    with pdfplumber.open(pdf_path) as pdf:
        text = ""
        for page in pdf.pages:
            text += page.extract_text()
    return text

# 指定PDF文件路径
pdf_file = "D:/IDEProjects/Test/uploads/resume.png"

# 调用函数进行文本提取
extracted_text = extract_text_from_pdf(pdf_file)

# 打印提取的文本
print(extracted_text)
